-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: View Raw Messages #91
Conversation
@@ -705,9 +718,15 @@ def main(): | |||
# read in bytes from COM port | |||
chunk = ser.read(CHUNK_SIZE) | |||
chunk = chunk.hex() | |||
|
|||
if args.rawest: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to make it very clear that the args.rawest
prints can have incomplete messages. Can you please add their usage (as well as this warning) in the README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge after README updates
Purpose:
--raw
or--rawest
option to simply print the raw data coming over serial as a hex string. This helps greatly with debugging firmware issues because it shows how your data is packed and helps with identifying patterns in data.README.md
:Changes:
Added
--raw
option to the argument list and its associated print hex statement. This option is meant to print the message field that will be sent to the parser.Added the
--rawest
option to the argument list and its associated print hex statement. This option prints the exact hex chunk received over radio without any post-processing with theprocess_message
function (this just cuts up the chunk into valid message pieces).Added try and catch check for
fromhex
error when converting hex message to latin-1 string inprocess_message
function. This previously would crash the problem (the reason for this problem existing it unknown), now it will print what it tried to convert and will DISCARD THE ENTIRE CHUNK COLLECTED.Added README.md for the memorator upload script so people know to change the log folder path to where the SD card is before uploading.
FIXES:
fix_concat_msg
branch missed changingparse_response['message']
tomsg
in theno-write
endpoint on the parser. This meant that any concatenated messages would not be split up and parse fails would still occur.fail_msg
accessed in theINFLUX_WRITE_FAIL
check, however, was only initialized in thePARSE_FAIL
check outside of scope.